package com.huilian.iotbox.admin.wap.service;

import com.github.pagehelper.PageInfo;
import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.UserDto;
import com.huilian.iotbox.data.dto.UserStoreDto;
import com.huilian.iotbox.data.po.User;
import com.huilian.iotbox.data.vo.UserInfo;
import com.huilian.iotbox.data.vo.UserVo;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 少凡
 * @date 2020/2/23 10:38
 */
public interface UserService {
    ServerResponse login(User user);

    ServerResponse getListByAgencyId(UserInfo userInfo);

    ServerResponse add(User user);

    ServerResponse update(User user);

    ServerResponse delete(Integer userId);

    ServerResponse checkIsExist(String mobile, String username);

    UserInfo getLoginUserInfo(HttpServletRequest request);

    ServerResponse smsCode(UserDto userDto, String templateid);

    ServerResponse register(UserDto userDto);

    User findUserById(Integer id);

    ServerResponse findUserBalance(UserInfo userInfo);

    Integer updateUserReceiptType(UserDto userDto);

    UserVo findUserReceiptType(UserInfo userInfo);

    ServerResponse updatePwd(UserDto userDto);

    ServerResponse resetPwd(UserDto userDto);

    Integer updateUser(User user);

    ServerResponse updateOperatePassword(UserDto userDto);

    User queryById(int parseInt);

    UserInfo getNewUserInfo(HttpServletRequest request);

    ServerResponse loginPwdReset(UserDto userDto,HttpServletRequest request);

    ServerResponse operatePwdReset(UserDto userDto);

    ServerResponse getResetSmsCode(UserDto userDto, String templateid);

    ServerResponse forgetOperate(UserDto userDto);

    ServerResponse forgetLogin(UserDto userDto);

    ServerResponse updateOpenId(UserDto userDto);

    UserVo findOperatePasswordByUserId(Integer userId);

    User getUserByUnionId(String unionId, Integer status);

    ServerResponse officialAccountSimulatedAccountLogin(User user);

    ServerResponse bindWeChatOfficialAccountLogin(UserDto userDto);

    ServerResponse checkAccountExistAndBindWx(UserDto userDto);

    User registerUser(UserDto userDto);

    ServerResponse registerByAppletMobile(UserDto userDto);

    ServerResponse updateMobile(UserDto userDto);

    ServerResponse findById(Integer id);

    User getMobileAndUnionId(Integer id);

    ServerResponse unbindMobileOrWeChat(UserDto userDto);

    ServerResponse updateUnionIdAndOpenId(UserDto userDto);

    ServerResponse updateUserInfo(UserDto userDto) throws Exception;

    User findSubUserId(UserDto userDto);

    Integer updateOfficialAccountOpenId(Integer userId, String officialAccountOpenId, Integer officialAccountId);

    ServerResponse findWhetherToSetWechatNotification(Integer id);

    User getUserByOpenId(String openId, Integer status);

    ServerResponse sendSubscribe(UserDto userDto);
    ServerResponse findUserByMerchantStoreId(UserDto userDto);

    ServerResponse editUserRolePermission(UserStoreDto userStoreDto);

    ServerResponse finOneUserAndRoleUserByUserId(UserDto userDto);

    ServerResponse findSubAccountV2(User user);

    ServerResponse deleteSubAccountByUserIdV2(UserDto userDto);

}
